import time
from multiprocessing import Pool as mp
def run(num):
    print('num is {}'.format(num))
    if num == 0:
        time.sleep(5)
    print('{} is end'.format(num))
if __name__ == '__main__':
    print('start')
    pool = mp(5)
    for i in range(3):
        pool.apply_async(run,(i,))
    print('非阻塞------')
    pool.close()
    pool.join()
    print('end')
